package com.lt.reflex;


import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;

/**
 * Copyright (C), 2006-2010, ChengDu ybyainfo. Co., Ltd.
 * FileName: Test.java
 *
 * @version 1.00
 * @Author lt
 * @Date 2020/5/20 15:30
 **/
public class Test {


    public static void main(String[] args) {
        Student student = new Student();
        Class c = Student.class;
        Method[] method = c.getDeclaredMethods();
        for (Method method1: method){
            System.out.println(method1.toString());
        }

        Field[] field = c.getDeclaredFields();
        for(Field f:field){
            System.out.println(f.toString());
        }

        Constructor[] constructor = c.getDeclaredConstructors();
        for(Constructor constructor1: constructor){
            System.out.println(c.toString());
        }
    }
}
